/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.blockchain.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author linco
 * @date 2022-07-31 18:20:21
 */
@Data
@TableName("ddc_transfer_request")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DDC转账请求")
public class DdcTransferRequest extends Model<DdcTransferRequest> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	private Long id;

	/**
	 * 发起地址
	 */
	@ApiModelProperty(value = "发起地址")
	private String fromAddress;

	/**
	 * 接收地址
	 */
	@ApiModelProperty(value = "接收地址")
	private String toAddress;

	/**
	 * 份数
	 */
	@ApiModelProperty(value = "份数")
	private Integer copies;

	/**
	 * ddcType
	 */
	@ApiModelProperty(value = "ddcType")
	private Integer ddcType;

	/**
	 * token/ddc id
	 */
	@ApiModelProperty(value = "token/ddc id")
	private String token;

	/**
	 * 状态:[0-新建,1-发送交易,2-获取交易数据,3-记录流转记录,4-更新余额,5-完成]
	 */
	@ApiModelProperty(value = "状态:[0-新建,1-充值业务费,2-充值能量值,3-发送交易,4-获取交易数据,5-记录流转记录,6-更新余额,7-完成]")
	private Integer status;

	/**
	 * 请求id
	 */
	@ApiModelProperty(value = "请求id")
	private String requestId;

	/**
	 * 附加数据
	 */
	@ApiModelProperty(value = "附加数据")
	private String extraData;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	/**
	 * 修改时间
	 */
	@TableField(fill = FieldFill.UPDATE)
	@ApiModelProperty(value = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * message
	 */
	@ApiModelProperty(value = "message")
	private String message;

	/**
	 * 是否成功
	 */
	@ApiModelProperty(value = "是否成功")
	private Boolean isSuccess;

	/**
	 * 是否完成
	 */
	@ApiModelProperty(value = "是否完成")
	private Boolean isFinish;

	/**
	 * 交易Hash
	 */
	@ApiModelProperty(value = "交易Hash")
	private String txHash;

	/**
	 * 交易id
	 */
	@ApiModelProperty(value = "交易id")
	private Long txId;


	/**
	 * 区块高度
	 */
	@ApiModelProperty(value = "区块高度")
	private Long blockNumber;

	/**
	 * 重试次数
	 */
	@ApiModelProperty(value = "重试次数")
	private Integer retries;

}
